<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>  
<table class="pageTable" align="left" width="710px">
<tr>
	<td width="18%" align="center">第&nbsp;${pagination.page}&nbsp;页/共&nbsp;${pagination.totalPages}&nbsp;页</td>
   	<td width="6%" align="center">
    <a href="javascript:gotoFirst()" title="第一页"><img src="${path}/images/tostart.png" style="border: 0px;"></img></a>
    </td>
    <td width="6%" align="center">
    <a href="javascript:gotoFront()" title="上一页"><img src="${path}/images/backward.png" style="border: 0px;"></img></a>
	</td>
	<td width="6%" align="center">
    <a href="javascript:gotoNext()" title="下一页"><img src="${path}/images/foward.png" style="border: 0px;"></img></a>
	</td>
	<td width="6%" align="center">
	<a href="javascript:gotoLast()" title="最后一页"><img src="${path}/images/toend.png" style="border: 0px;"></img></a>
    </td>
    <td width="5%" align="right" nowrap="nowrap">转到： </td>
    <td width="6%" align="right" nowrap="nowrap"><input id="gotopage" name="gotopage" type="text" size="5" />页 </td>
	<td width="6%" align="left" nowrap="nowrap"><a target="_self" href="javascript:gotoPage()"><img src="${path}/images/page_confi.gif" style="border: 0px;height: 18px;"></img></a> </td>
</tr>
</table>
<input type="hidden" name="currentPage" id="currentPage" value="${pagination.page}">
<script type="text/javascript">

//分页方法类
function gotoFirst(){
    //每一页显示的条数,
if(document.all.currentPage.value<=1){
	alert("已是首页!!");
}else{
	document.all.currentPage.value=1;
	page();
	}
}
function gotoFront(){

    //每一页显示的条数,
if(document.all.currentPage.value<=1){
	alert("已是首页");
}else{
	document.all.currentPage.value-=1;
	page();
	}
}
function gotoNext(){
    //每一页显示的条数,
if(document.all.currentPage.value>=${pagination.totalPages}){
	alert("已是末页");
}else{
	document.all.currentPage.value=document.all.currentPage.value/1+1;
	page();
	}
}
function gotoLast(){
    //每一页显示的条数,
if(document.all.currentPage.value>=${pagination.totalPages}){
	alert("已是末页");
}else{
	document.all.currentPage.value=${pagination.totalPages};
	page();
	}
}

function gotoPage(){
    //每一页显示的条数,
  if(document.all.gotopage.value<1){
    alert("页码数不能小于1");
  }else{
    if(document.all.gotopage.value>${pagination.totalPages}){
      alert("页码数不能大于最大页数");
    }else{
      document.all.currentPage.value=document.all.gotopage.value;
      page();
    }
  }
}
function page (){
  document.form.submit();
}
</script>


